<?php
/**
 *
 */

namespace Selibra\Task;


use Selibra\Task\Protocol\TaskConsumer;

class TaskMessage
{

    /**
     * 地址
     * @var string
     */
    protected $address;


    /**
     * @var TaskConsumer
     */
    private $taskConsumer;


    private $data;


    /**
     * @return mixed
     */
    public function getAddress()
    {
        return $this->address;
    }


    /**
     * @param mixed $address
     */
    public function setAddress($address): void
    {
        $this->address = $address;
    }


    /**
     * @param TaskConsumer $taskConsumer
     * @return $this
     */
    public function setConsumer(TaskConsumer $taskConsumer)
    {
        $this->taskConsumer = $taskConsumer;
        return $this;
    }


    /**
     * @return TaskConsumer
     */
    public function getTaskConsumer(): TaskConsumer
    {
        return $this->taskConsumer;
    }


    public function getData()
    {
        return $this->data;
    }


    /**
     * @param string $data
     * @return $this
     */
    public function setData(string $data)
    {
        $this->data = $data;
        return $this;
    }

}